home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / database / postgres / mpsql-1.001 / mpsql-1~ / mpsql-1.0 / llist.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-28  |  1.7 KB  |  45 lines

  1. /************************************************************************/
  2. /* File   : llist.h                                        */
  3. /* Purpose: linked list  module header                                */
  4. /* By     : Keith R. Davis                                */
  5. /* Date   : 12/27/95                                        */
  6. /* Notes  : Copyright(c) 1996 White River Software                     */
  7. /************************************************************************/
  8.  
  9. #ifndef _LLIST_H
  10. #define _LLIST_H
  11.  
  12. /* linked list stuff for sql file buffers */
  13.  
  14. typedef struct _llist_buffer{
  15.   Widget                buffer;         /* text buffer                          */
  16.   int                   modified;       /* buffer modified flag                 */
  17.   char                  *filename;      /* buffer's file name                   */             
  18.   struct _llist_buffer  *next;          /* ptr to next buffer                   */
  19.   struct _llist_buffer  *prev;          /* ptr to previous buffer               */
  20. }LLISTbuffer;
  21.  
  22. extern LLISTbuffer      *buffer_head;   /* buffer list head                     */
  23. extern LLISTbuffer      *buffer_tail;   /* buffer list tail                     */
  24. extern LLISTbuffer      *buffer_curr;   /* current pos in buffer list           */
  25.  
  26. /* initializes linked list */
  27. LLISTbuffer* LLIST_Init(void);
  28.  
  29. /* deletes node from linked list */
  30. void LLIST_Delete(LLISTbuffer *node);
  31.  
  32. /* inserts node into linked list before specified node*/
  33. LLISTbuffer* LLIST_Insert(int mod, char *file, LLISTbuffer *node);
  34.  
  35. /* disposes of linked list */
  36. void LLIST_Remove(void);
  37.  
  38. /* returns count of items in the linked list */
  39. int LLIST_Count(void);
  40.  
  41. /* returns node at specified index */
  42. LLISTbuffer* LLIST_Get(int index);
  43.     
  44. #endif    
  45.